home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / ARexxTools / TritonRexx376.lha / TritonRexx / Rexx / Listview.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-09-17  |  1.8 KB  |  77 lines

  1. /* Listview.rexx */
  2.  
  3. IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
  4.    IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
  5.       SAY 'Kann die <tritonrexx.library> nicht öffnen!'
  6.       EXIT(10)
  7.    END
  8. END
  9.  
  10. list.0 = 7
  11. list.1 = 'Montag'
  12. list.2 = 'Dienstag'
  13. list.3 = 'Mittwoch'
  14. list.4 = 'Donnerstag'
  15. list.5 = 'Freitag'
  16. list.6 = 'Samstag'
  17. list.7 = 'Sonntag'
  18.  
  19. windowtags =   WindowID(1),
  20.                WindowTitle('Listview'),
  21.                   'HorizGroupA',
  22.                      'Space',
  23.                      'VertGroupA',
  24.                         'Space',
  25.                         CenteredTextID("_Liste",7),
  26.                         'Space',
  27.                         ListSS('list',7,0,2),
  28.                         'Space',
  29.                      'EndGroup',
  30.                      'Space',
  31.                   'EndGroup',
  32.                'EndProject'
  33.  
  34. app = TR_CREATEAPP('TRCA_Name Listview')
  35.  
  36. IF app ~= '00000000'x THEN DO
  37.  
  38.    window = TR_OPENPROJECT(app,windowtags)
  39.  
  40.    IF window ~= '00000000'x THEN DO
  41.       ende = 0
  42.  
  43.       DO WHILE ende ~= 1
  44.          CALL TR_WAIT(app,'')
  45.  
  46.          DO WHILE TR_HANDLEMSG(app,'event')
  47.             IF event.trm_class = 'TRMS_NEWVALUE' THEN DO
  48.                SELECT
  49.                   WHEN event.trm_id = 7 THEN DO
  50.                      nummer = event.trm_data+1
  51.  
  52.                      SAY 'Ausgewählt:' nummer '=' list.nummer
  53.                   END
  54.  
  55.                   OTHERWISE
  56.                      NOP
  57.                END
  58.             END
  59.  
  60.             IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN DO
  61.                nummer = TR_GETATTRIBUTE(window,7,'TRAT_Value')+1
  62.  
  63.                SAY 'Ausgewählt war:' nummer '=' list.nummer
  64.  
  65.                ende = 1
  66.             END
  67.          END
  68.       END
  69.  
  70.       CALL TR_CLOSEPROJECT(window)
  71.    END
  72.  
  73.    CALL TR_DELETEAPP(app)
  74. END
  75.  
  76. EXIT(0)
  77.